﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WinFormsAppTest.Dao;
using WinFormsAppTest.pojo;

namespace WinFormsAppTest.Service
{
    internal class ExamService
    {
        public List<Exam> GetExams()
        {
            ExamDao examdao = new ExamDao();
            List<Exam> exams = examdao.GetExams();
            return exams;
        }

        //根据用户id进行搜索
        public List<Exam> GetExamByUserId(int id)
        {
            ExamDao examdao = new ExamDao();
            List<Exam> exams = examdao.GetExamByUserId(id);
            return exams;
        }

        //根据考核id进行搜索
        public List<Exam> GetExamById(int id)
        {
            ExamDao examdao = new ExamDao();
            List<Exam> exams = examdao.GetExamById(id);
            return exams;
        }

        //根据考核情况搜索
        public List<Exam> GetExamByState(string state)
        {
            ExamDao examdao = new ExamDao();
            List<Exam> exams = examdao.GetExamByState(state);
            return exams;
        }
    }
}
